//
//  UIView+Extension.h
//  MJRefreshExample
//
//  Created by MJ Lee on 14-5-28.
//  Copyright (c) 2014年 itcast. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIView (Extension)
@property (nonatomic, assign, readonly) CGPoint bottomLeft;
@property (nonatomic, assign, readonly) CGPoint bottomRight;
@property (nonatomic, assign, readonly) CGPoint topRight;
@property (nonatomic, assign) CGPoint origin;

@property (assign, nonatomic) CGFloat x;
@property (assign, nonatomic) CGFloat y;
@property (assign, nonatomic) CGFloat maxX;
@property (assign, nonatomic) CGFloat maxY;
@property (assign, nonatomic) CGFloat width;
@property (assign, nonatomic) CGFloat height;
@property (assign, nonatomic) CGSize size;
@property (assign, nonatomic) CGFloat centerX;
@property (assign, nonatomic) CGFloat centerY;
@property (nonatomic, assign) CGFloat top;
@property (nonatomic, assign) CGFloat left;
@property (nonatomic, assign) CGFloat bottom;
@property (nonatomic, assign) CGFloat right;
- (void) setCorner:(float)r;
+ (UIView *)createLineView:(UIView *)superView;
+ (UIView *)createLineView:(UIView *)superView frame:(CGRect)rect;
+ (UIView *)createLineViewInTop:(UIView *)superView;
+ (UIView *)createLineViewInbottom:(UIView *)superView;
+ (void)createTapGestureInView:(UIView *)view target:(id)target action:(SEL)selector;

/**
*  给view添加阴影
*
*  @param color   阴影颜色
*  @param offset  偏移量
*  @param opacity 不透明度
*  @param radius  距离
*/
- (void)createShadowWithColor:(UIColor *)color offSet:(CGSize)offset opacity:(CGFloat)opacity radius:(CGFloat)radius;
/**
 *  给view添加阴影
 *
 *  @param color   阴影颜色
 *  @param offset  偏移量
 *  @param opacity 不透明度
 *  @param radius  距离
 *  @param conerRadius  圆角
 */
- (void)createShadowWithColor:(UIColor *)color offSet:(CGSize)offset opacity:(CGFloat)opacity radius:(CGFloat)radius cornerRadius:(CGFloat)conerRadius;

- (void)drawLineFromPoint:(CGPoint)fromPoint toPoint:(CGPoint)toPoint lineColor:(UIColor *)lineColor lineWidth:(CGFloat)width;


///如需将x,y将向上取整数 如 1.3f~>2.f  则在.m中加上ceilf(x 'or' y);

//*
- (void)removeAllSubviews;
- (void)removeAllGestureRecognizers;
///截图
- (UIImage *)screenshotWithQuality:(CGFloat)imageQuality;



@end
